import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    redirect: '/login'
  },
  {
    path: '/',
    component: () =>
      import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
    meta: { title: '自述文件' },
    children: [{
      // 富文本编辑器组件
      path: '/unDeliverOrder',
      component: () =>
        import(/* webpackChunkName: "editor" */ '../components/page/unDeliverOrder.vue'),
      meta: { title: '待发货订单' }
    }, {
      // 富文本编辑器组件
      path: '/deliveredOrder',
      component: () =>
        import(/* webpackChunkName: "editor" */ '../components/page/deliveredOrder.vue'),
      meta: { title: '已发货订单' }
    }, {
      // 富文本编辑器组件
      path: '/unPaymentOrder',
      component: () =>
        import(/* webpackChunkName: "editor" */ '../components/page/unPaymentOrder.vue'),
      meta: { title: '未支付订单' }
    }, {
      // 富文本编辑器组件
      path: '/finishOrder',
      component: () =>
        import(/* webpackChunkName: "editor" */ '../components/page/finishOrder.vue'),
      meta: { title: '已完成订单' }
    }, {
      // 富文本编辑器组件
      path: '/cloudStocksOrder',
      component: () =>
        import(/* webpackChunkName: "editor" */ '../components/page/cloudStocksOrder.vue'),
      meta: { title: '代储库订单' }
    },
    {
      path: '/404',
      component: () =>
        import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
      meta: { title: '404' }
    },
    {
      path: '/403',
      component: () =>
        import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
      meta: { title: '403' }
    },
    {
      path: '/memberlist',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/mana.vue'),
      meta: { title: 'memberlist' }
    },
    {
      path: '/PerformanceQuery',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/PerformanceQuery.vue'),
      meta: { title: 'PerformanceQuery' }
    },
    {
      path: '/verification',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/404.vue'),
      meta: { title: '404' }
    },
    {
      path: '/agentlist',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/404.vue'),
      meta: { title: '404' }
    },
    {
      path: '/brandSetting',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/brandmanage.vue'),
      meta: { title: 'brandSetting' }
    },
    {
      path: '/categorySetting',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/categorymanage.vue'),
      meta: { title: 'categorySetting' }
    },
    {
      path: '/commodityList',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/goodsmanage.vue'),
      meta: { title: 'commodityList' }
    },
    {
      path: '/commodityList/addgoods',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/addgoods.vue'),
      meta: { title: 'addgoods' }
    },
    {
      path: '/commodityList/editgoods/:role',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/editgoods.vue'),
      meta: { title: 'checkdetaill' }
    },
    {
      path: '/entrepotList',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/respoitrymanage.vue'),
      meta: { title: 'entrepotList' }
    },
    {
      path: '/inventoryList',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/inventorymanage.vue'),
      meta: { title: 'inventoryList ' }
    },
    {
      path: '/withdrawRecord',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/cashlist.vue'),
      meta: { title: 'withdrawRecord' }
    },
    {
      path: '/accountBrowse',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/liveoverview.vue'),
      meta: { title: 'accountBrowse' }
    },
    {
      path: '/transactionDetail',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/livedetail.vue'),
      meta: { title: 'transactionDetail' }
    },
    {
      path: '/companyAccounts',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/404.vue'),
      meta: { title: '404' }
    },
    {
      path: '/slideshow',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/chartsetting.vue'),
      meta: { title: 'slideshow' }
    },
    {
      path: '/Incentives',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/404.vue'),
      meta: { title: '404' }
    },
    {
      path: '/mainsetting',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/mainsetting.vue'),
      meta: { title: 'mainsetting' }
    },
    {
      path: '/rolemanage',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/404.vue'),
      meta: { title: '404' }
    },
    {
      path: '/usermanage',
      component: () =>
        import(/* webpackChunkName: "mana" */ '../components/page/404.vue'),
      meta: { title: '404' }
    }
    ]
  },
  {
    path: '/login',
    component: () =>
      import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
    meta: { title: '登录' }
  },
  {
    path: '*',
    redirect: '/404'
  }
  ]
})
